<table border=2 class="table adminGrid" class="table_list tbody_hover roles_list">
    <thead>
        <tr>
            <th>
                <?php echo __('action') ?>
            </th>
            <th style="width: 30%">
                <?php echo __('role') ?>
            </th>
            <th style="width: 8%">
                <?php echo __('type') ?>
            </th>
            <th>
                <?php echo __('default role') ?>
            </th>
            <th>
                <?php echo __('role on each site component') ?>
            </th>
            <th>
                <?php echo __('show') ?>
            </th>
            <th>
                <?php echo __('add') ?>
            </th>
            <th>
                <?php echo __('edit') ?>
            </th>
            <th>
                <?php echo __('delete') ?>
            </th>
            <th>
                <?php echo __('check') ?>
            </th>
            <th>
                <?php echo __('change status') ?>
            </th>

        </tr>  
    </thead>

    <?php foreach ($forms as $form): ?>

        <tbody>

            <tr>
                <td rowspan="6">
                    <a class="edit_role" href="<?php echo url_for('@EditRole?id=' . $form->getObject()->getId()) ?>">
                        <?php echo __('edit') ?>
                    </a>
                    <a class="delete_role" href="<?php echo url_for('@DeleteRole?id=' . $form->getObject()->getId())?>" val="<?php echo $form->getObject()->getTitle() ?>">
                        <?php echo __('delete') ?>
                    </a>
                </td>
                <td rowspan="6">
                    <?php echo $form->getObject(); ?>
                </td>

                <td rowspan="6">
                    <?php echo __($form->getObject()->getTypeName()); ?>
                </td>
                <td rowspan="6">
                    <?php echo $form['default_role']->render() ?>

                </td>
            </tr>
            <?php foreach ($form['RoleTask'] as $roleTaskForm): ?>
                <tr>
                    <td>
                        <?php echo $roleTaskForm->renderLabel() ?>
                    </td>
                    <td>
                        <?php echo $roleTaskForm['view_task']->render() ?>
                    </td>
                    <td>
                        <?php echo $roleTaskForm['add_task']->render() ?>
                    </td>
                    <td>
                        <?php echo $roleTaskForm['edit_task']->render() ?>
                    </td>
                    <td>
                        <?php echo $roleTaskForm['delete_task']->render() ?>
                    </td>
                    <td>
                        <?php echo $roleTaskForm['check_task']->render() ?>
                    </td>
                    <td>
                        <?php echo $roleTaskForm['change_status_task']->render() ?>
                    </td>
                </tr>
            <?php endforeach ?>
        </tbody>

        <?php ?>
    <?php endforeach ?>
</table>
